<template>
  <view v-if="pageShow" class="contanier">
    <view class="header">
      <view class="left" @click="goShopRecord(0)">
        <image
          src="https://xzcs-public-files.oss-cn-beijing.aliyuncs.com/static/activityCenter/bamboo-icon.png"
          class="img"
        ></image>
        <text style="color: #ff6161; margin-left: 6rpx">{{
          userInfo.money
        }}</text>
        <text style="color: #333333">积分</text>
      </view>
      <view class="middle"> </view>
      <view class="right" @click="goShopRecord(2)">
        <image
          src="https://xzcs-public-files.oss-cn-beijing.aliyuncs.com/static/activityCenter/shop_gift-icon.png"
          class="img"
        ></image>
        <text style="margin-left: 6rpx">兑换记录</text>
      </view>
    </view>
    <view class="tabs">
      <u-tabs
        :list="tabList"
        @click="tabClick"
        lineColor="linear-gradient(90deg, #FED759 0%, #FFF8E1 100%);"
        :current="current"
        :scrollable="false"
        :activeStyle="{
          color: '#333333',
          fontWeight: 'bold',
          fontSize: '44rpx',
        }"
        :inactiveStyle="{
          color: '#333333',
          fontSize: '34rpx',
        }"
      >
      </u-tabs>
    </view>
    <view class="shop-list">
      <view v-if="shopList.length > 0" class="commodity">
        <view
          class="item"
          v-for="(item, index) in shopList"
          :key="index"
          @click="goShopDetail(item)"
        >
          <image :src="item.img" class="img" mode="aspectFill"></image>
          <view class="item-text">
            <text style="font-size: 30rpx; color: #333; font-weight: 500">{{
              item.name
            }}</text>
            <text style="font-size: 26rpx; color: #e1931f; margin-top: 17rpx"
              >{{ item.money }}积分</text
            >
          </view>
        </view>
      </view>
      <view v-if="shopList.length === 0">
        <view class="empty-wrap">
          <image
            class="empty-img"
            src="https://xzcs-public-files.oss-cn-beijing.aliyuncs.com/static/coupon/contentVanshi.png"
          ></image>
          <text class="tips">暂无商品</text>
        </view>
      </view>
    </view>
  </view>
</template>

<script
  type="text/javascript"
  src="plus-confusion://../pointsMall/shopList/index"
></script>

<style lang="scss" scoped>
@import "./index.scss";
</style>
